using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Mapping.ByCode;
using Domain.UQBuy.Model.Entity;


namespace Domain.UQBuy.Model.Map {
    
    
    public class OzUserMap : ClassMapping<OzUser> {
        
        public OzUserMap() {
			Table("OZ_User");
			Schema("dbo");
			Lazy(true);
			Id(x => x.UserId, map => { map.Column("User_ID"); map.Generator(Generators.Assigned); });
			Property(x => x.UserCode, map => { map.Column("User_Code"); map.Length(255); });
			Property(x => x.UserLoginname, map => { map.Column("User_LoginName"); map.Length(255); });
			Property(x => x.UserRealname, map => { map.Column("User_RealName"); map.Length(255); });
			Property(x => x.UserPassword, map => { map.Column("User_Password"); map.Length(255); });
			Property(x => x.UserEmail, map => { map.Column("User_Email"); map.Length(255); });
			Property(x => x.UserMobile, map => { map.Column("User_Mobile"); map.Length(255); });
			Property(x => x.UserCreatedate, map => map.Column("User_CreateDate"));
			Property(x => x.UserStatus, map => { map.Column("User_Status"); map.Precision(10); });
			Bag(x => x.OzUserDetail, colmap =>  { colmap.Key(x => x.Column("User_ID")); colmap.Inverse(true); }, map => { map.OneToMany(); });
        }
    }
}
